﻿namespace Commander.Core.Interfaces.Shared
{
    using System;

    /// <summary>
    /// Generic IoC/DI contract
    /// </summary>
    public interface IContainer
    {
        TInterface Get<TInterface>();
        TInterface Get<TInterface>(object context);

        object Get(Type interfaceType);
        object Get(Type interfaceType, object context);

        bool Has<TInterface>();
        bool Has<TInterface>(object context);

        bool Has(Type interfaceType);
        bool Has(Type interfaceType, object context);

        void SetUp<TInterface, TImplementation>() where TImplementation : TInterface;
        void SetUp<TInterface, TImplementation>(object context) where TImplementation : TInterface;

        void SetUp(Type interfaceType, Type implementation);
        void SetUp(Type interfaceType, Type implementation, object context);
    }
}
